package com.issac.staticresources.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/*
* 自定义静态资源配置:
*   application.yml/application.properties
*   重写addResourceHandlers方法
* 静态资源默认5个路径;
*   META-INF/resources/
*   resources/
*   static/
*   public/
*   webapp/
* */
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {


    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/**").addResourceLocations("classpath:/issac/");
    }
}

